<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>新增采购退货单</title>
    <link href="<%=path%>/css/core.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/form.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/list.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/CustomerSelect.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/UsersSelect.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/xWindowPanel.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/xToolbar.css" rel="stylesheet" type="text/css"/>
	<link href="<%=path%>/css/style_min.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
    input { width: 180px;}
    textarea { width: 503px; height: 40px;}
    select { width: 188px;}
    .n { text-align: right;}
    </style>
  </head>
  <body>
    <form name="objectForm" id="objectForm" action="<%=path%>/product/backPurchase/update.t4m" class="form" method="post">
      <input type="hidden" name="object.id" value="${object.id}"/>
      <div class="form-group">基本信息</div>
      <table class="form-table" cellspacing="0" cellpadding="0" width="100%">
        <tr>
          <td class="form-left"><span class="form-required">*</span>采购退货单编号</td>
          <td class="form-right"><input type="text" name="object.code" value="${object.code}" class="text required"/></td>
          <td class="form-left"><span class="form-required">*</span>退货日期</td>
          <td class="form-right"><input type="text" name="object.backDate" class="Wdate text f required" value='<s:date name="object.backDate" format="yyyy-MM-dd"/>' onclick="new WdatePicker();"/></td>
        </tr>
      </table>
     
      <div class="form-group">采购退货单明细</div>
      <div id="toolbar"></div>
      <table id="titleTable" cellpadding="0" cellspacing="0">
        <tr>
          <td>货品编号</td>
          <td>货品名称</td>
          <td>规格型号</td>
          <td>生产商</td>
          <td>退货数量</td>
        </tr>
      </table>
      <table id="dataTable" cellpadding="0" cellspacing="0">
      <s:iterator id="object" value="list" status="i">
        <tr class="row" >
          <td><span><s:property value="#object.product.code"/></span></td>
          <td><span><s:property value="#object.product.name"/></span></td>
          <td><span><s:property value="#object.product.standard"/></span></td>
          <td><span><s:property value="#object.product.manufacturer"/></span></td>
          <td><span><input type="text" name="list[${i.index}].amounts" value="<s:property value="#object.amounts"/>">
          <input type="hidden" name="list[${i.index}].id" value="<s:property value="#object.id"/>">
          </span></td>
        </tr>
        
      </s:iterator>
      </table>
      <s:hidden name="tabId"/>
      <s:hidden name="windowPanelId"/>
    </form>
    <script src="<%=path%>/js/prototype_for_validation.js" type="text/javascript"></script>
    <script src="<%=path%>/js/validation_cn.js" type="text/javascript"></script>
    <script src="<%=path%>/js/core.js" type="text/javascript"></script>
    <script src="<%=path%>/js/share.js" type="text/javascript"></script>
    <script src="<%=path%>/js/jquery.js" type="text/javascript"></script>
    <script src="<%=path%>/js/Validate.js" type="text/javascript"></script>
    <script src="<%=path%>/js/datePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="<%=path%>/js/CustomerSelect.js" type="text/javascript"></script>
    <script src="<%=path%>/js/UsersSelect.js" type="text/javascript"></script>
    <script src="<%=path%>/js/xWindowPanel.js" type="text/javascript"></script>
    <script src="<%=path%>/js/Draggable.js" type="text/javascript"></script>
    <script src="<%=path%>/js/xToolbar.js" type="text/javascript"></script>
    <script src="<%=path%>/js/xToolbar.items.js" type="text/javascript"></script>
    <script src="<%=path%>/js/modules/stock.js" type="text/javascript"></script>
    <script src="<%=path%>/js/modules/product/product.js" type="text/javascript"></script>
	<script src="<%=path%>/js/Grid.js" type="text/javascript"></script>
    <script type="text/javascript" src="<%=path%>/js/BoxSelect.js"></script>
	<script src="<%=path%>/js/jquery-impromptu.js" type="text/javascript"></script>
    <script type="text/javascript">
	var valid = new Validation('objectForm',{immediate:true});
    
    $(document).ready(function(){
      
      grid = new Grid({
        titleTable:'titleTable',
        dataTable:'dataTable',
        widths : [120,100,88,88,120],
        height : 268
      });
    });
      
    </script>
  </body>
</html>